import React from "react";
import {useNavigate} from 'react-router-dom'
import { NavBar, Cell,Button } from "react-vant";
import "./index.css";
const Index: React.FC = () => {
    const navigate=useNavigate()
  let img: any = localStorage.getItem("info");
  const tcdl=()=>{
    navigate('/login')
    localStorage.clear()
  }
  return (
    <div>
      <NavBar title="我的" leftArrow={false} />
      <div className="txbox">
        <img src={img} className="tx" />
      </div>
      <Cell title="用户名" value={localStorage.getItem("user")} />
      <div className="tcbtn"> <Button  type='danger' block round onClick={()=>tcdl()}>
        退出登录
      </Button></div>
    </div>
  );
};
export default Index;
